home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / ASM-PPC / VGA.H < prev   
C/C++ Source or Header  |  1999-09-17  |  1KB  |  54 lines

  1. /*
  2.  *    Access to VGA videoram
  3.  *
  4.  *    (c) 1998 Martin Mares <mj@ucw.cz>
  5.  */
  6.  
  7. #ifndef _LINUX_ASM_VGA_H_
  8. #define _LINUX_ASM_VGA_H_
  9.  
  10. #include <asm/io.h>
  11. #include <asm/processor.h>
  12.  
  13. #include <linux/config.h>
  14. #include <linux/console.h>
  15.  
  16. #define VT_BUF_HAVE_RW
  17.  
  18. extern inline void scr_writew(u16 val, u16 *addr)
  19. {
  20.     /* If using vgacon (not fbcon) byteswap the writes.
  21.      * If non-vgacon assume fbcon and don't byteswap
  22.      * just like include/linux/vt_buffer.h.
  23.      * XXX: this is a performance loss so get rid of it
  24.      *      as soon as fbcon works on prep.
  25.      * -- Cort
  26.      */
  27. #ifdef CONFIG_FB
  28.     if ( conswitchp != &vga_con )
  29.         (*(addr) = (val));
  30.     else
  31. #endif /* CONFIG_FB */
  32.         st_le16(addr, val);
  33. }
  34.  
  35. extern inline u16 scr_readw(const u16 *addr)
  36. {
  37. #ifdef CONFIG_FB
  38.     if ( conswitchp != &vga_con )
  39.         return (*(addr));
  40.     else
  41. #endif /* CONFIG_FB */
  42.         return ld_le16((unsigned short *)addr);
  43. }
  44.  
  45. #define VT_BUF_HAVE_MEMCPYF
  46. #define scr_memcpyw_from memcpy
  47. #define scr_memcpyw_to memcpy
  48.  
  49. #define VGA_MAP_MEM(x) (x + _ISA_MEM_BASE)
  50. #define vga_readb(x) (*(x))
  51. #define vga_writeb(x,y) (*(y) = (x))
  52.  
  53. #endif
  54.